<p id="notice"><%= notice %></p>

<h1>Listing products</h1>

<table>
  <tr>
    <th>Name</th>
    <th>Picture</th>
    <th>Price</th>
    <th>Category</th>
    <th></th>
    <th></th>
    <th></th>
  </tr>

  <% @category.products.each do |product| %>
      <tr>
        <td><%= product.name %></td>
        <td><%= product.picture %></td>
        <td><%= product.price %></td>
        <td><%= product.category.name %></td>
        <td><%= link_to 'Show', product %></td>
      </tr>
  <% end %>
</table>

<br />

<%= link_to 'Back', categories_path %>
